package com.itheima.dao;

import com.itheima.domain.SysLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * ClassName:SyslogDao
 * Package:com.itheima.dao
 * Description:
 * Date:2020/3/1322:31
 * User: snow
 */
@Repository
public interface SyslogDao {

	@Insert("insert into syslog(visitTime,username,ip,url,executionTime,method)" +
			" values(#{visitTime},#{username},#{ip},#{url},#{executionTime},#{method})")
	public void save(SysLog syslog) throws Exception;

	@Select("select * from sysLog")
	public List<SysLog> findAll() throws Exception;
}
